
/*
 * @ author Junr
 * @ use 全局API
 */
import Request from '../request';
// import tools from '../../utils/tools';
export default {
  // 文件上传
  fileUpload (params) {
    console.log(params);
    return Request.post({
      url: `/m/upload`,
      params
    });
  },
  // Base64上传
  cardFileUpload (params) {
    return Request.post({
      url: `/m/upload/base64`,
      params
    });
  },
  // 生成二维码
  getCode (params) {
    return Request.post({
      url: `/common/two/bit/code`,
      params
    });
  },
  // 商品列表
  goods (params) {
    return Request.post({
      url: `/goods/list`,
      params
    });
  },
  // 商品分类列表
  catelist (params) {
    return Request.post({
      url: `/cate/list`,
      params
    });
  },
  // 商品列表
  goodslist (params) {
    return Request.post({
      url: `/goods/list`,
      params
    });
  },
  // 商品详情信息
  goodsInfo (params) {
    return Request.post({
      url: `/goods/info`,
      params
    });
  },
  // 获取全局信息
  settingInfo (params) {
    return Request.post({
      url: `/m/setting/info`,
      params
    });
  },
  // 公告列表
  getNoticeList (params) {
    return Request.post({
      url: `/notice/list`,
      params
    });
  },
  // 公告详情
  getNoticeDetail (params) {
    return Request.post({
      url: `/notice/detail`,
      params
    });
  },
  // 确认订单
  goodsSubmit (params) {
    return Request.post({
      url: `/m/goods/submit`,
      params
    });
  },
  // 订单提交
  goodsConfirm (params) {
    return Request.post({
      url: `/m/order/confirm`,
      params
    });
  },
  // 注册协议和商业策略
  getCnt (params) {
    return Request.post({
      url: `/cnt/${params.code}`,
      params
    });
  },
  // 门店详情
  storeDetail(params) {
    return Request.post({
      url: `/shop/detail`,
      params
    });
  }
};
